Q: Does Apple support the development of external file systems (VFS plug-ins) on Mac OS X? Where can I find information about developing such a file system?
A: The answer depends on whether you're writing a leaf file system or a stacking file system.
- Leaf File Systems -- Apple does support the development of leaf file systems for Mac OS X. Unfortunately, there is no documentation that specifically covers Mac OS X's VFS plug-in architecture. However, the following resources should be helpful.
- Mac OS X's VFS architecture is derived from 4.4BSD. The Design and Implementation of the 4.4BSD Operation System (ISBN: 0-201-54979-4) includes a good overview of VFS on that system. As there are key differences between 4.4BSD and Mac OS X (for example, the Unified Buffer Cache and additional VFS entry points to support HFS semantics), you should not consider this book authoritative.
- For general information about Mac OS X kernel programming, see the documentation on the Apple developer web site.
- There are a small number of DTS Q&As that cover VFS.
- The source for a number of existing file systems is available in Darwin (the open source underpinnings of Mac OS X).
- If you have technical questions, there are a variety of mailing lists for free community-based support (I recommend the darwin-kernel mailing list) and DTS for paid support.
IMPORTANT:
As with all development in the BSD portions of the Mac OS X kernel, binary compatibility is not guaranteed for VFS plug-ins. We probably won't document the VFS layer properly until we have the binary compatibility story sorted out.
|
- Stacking File Systems -- Apple does not support the development of stacking VFS plug-ins on Mac OS X. We've taken this position because, in our opinion, it's not possible to create a stacking VFS plug-in that:
- works reliably,
- does not severely impinge on system performance, and
- has any hope of binary (or even source-level) compatibility with future systems.
Earlier Apple documentation stated that stacking VFS plug-ins could be used to solve certain problems, such as file-level encryption and virus checking. We even went so far as to publish an example of this, the Politically Correct file system (PCFS), that ran on pre-release builds of Mac OS X. Subsequent experience has shown that this technique does not work properly and we no longer support it. Thus, we have removed (or soon will) all references to stacking VFS from our documentation and we will not publish an update to PCFS. The existing PCFS source code is not useful because it has not been updated to support the Unified Buffer Cache.
If you have a problem that can only be solved via a stacking file system, please let us know by mailing DTS. While we can't support your development, we are interested in gathering information about what developers need and why. This feedback will guide our long-term approach to this question.
Finally, there are a number of third party developers who are working in this realm. If you are absolutely determined to develop an unsupported stacking VFS plug-in, you will find some help on the Internet.
[Mar 10, 2003]
|